import CryptoJS from 'crypto-js'

// 加密
export function encryption(src, keyWord) {
  const key = CryptoJS.enc.Utf8.parse(keyWord)
  // 加密
  const encrypted = CryptoJS.AES.encrypt(src, key, {
    iv: key,
    mode: CryptoJS.mode.CFB,
    padding: CryptoJS.pad.NoPadding,
  })
  return encrypted.toString()
}
